<!DOCTYPE html>
  <html lang="en">
  <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>用户列表</title>
      <link rel="stylesheet" href="element-ui/lib/theme-chalk/index.css">
	  <script src="https://unpkg.com/axios@0.20.0/dist/axios.min.js"></script>
      <script src="js/vue.js"></script>
      <script src="element-ui/lib/index.js"></script>
      <style>
        .el-header{
          background-color: #99CCFF;
        }
        .header-img{
          width: 50px;
          margin-top: 7px;
		  border-radius: 30px;
        }
      </style>
  </head>
  <body>
    <div id="div">
      <el-container>
        <!-- 头部 -->
        <el-header class="el-header">
          <el-container>
            <div>
              <el-image src="../img/timg.jpg" class="header-img" ></el-image>
            </div>
            <el-menu
              :default-active="activeIndex2"
              mode="horizontal"
              @select="handleSelect"
              background-color="#99CCFF"
              text-color="white"
              active-text-color="#ffd04b"
              style="margin-left: auto;">
				<el-menu-item index="1" v-on:click="GoToMain()">订单信息</el-menu-item>
				<el-menu-item index="2" v-on:click="GoToMycenter()">个人中心</el-menu-item>
				<el-menu-item index="3" v-on:click="GoToLogin()">退出</el-menu-item>
            </el-menu>
          </el-container>
        </el-header>
      </el-container>
	  <el-container style="height: 580px; border: 1px solid #eee">
	      <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
	          <el-menu :default-openeds="['1','2']">
				  <el-submenu index="1">
					  <template slot="title"><i class="el-icon-menu"></i>全部</template>
					  <el-menu-item-group>
						  <el-menu-item index="1-1" v-on:click="getTable(1)"><i class="el-icon-help"></i>全部发货信息</el-menu-item>
						  <el-menu-item index="1-2" v-on:click="getTable(2)"><i class="el-icon-help" ></i>全部收货信息</el-menu-item>
					  </el-menu-item-group>
				  </el-submenu>
				  <el-submenu index="2">
					  <template slot="title"><i class="el-icon-menu"></i>我的</template>
					  <el-menu-item-group>
						  <el-menu-item index="2-2" v-on:click='find_my_send()'><i class="el-icon-help"></i>我的发货信息</el-menu-item>
						  <el-menu-item index="2-3" v-on:click="find_my_accept()"><i class="el-icon-help"></i>我的收货信息</el-menu-item>
						  <el-menu-item index="2-1" v-on:click="find_my_common()"><i class="el-icon-help"></i>我的地址簿</el-menu-item>
						  <el-menu-item index="2-4" v-on:click="new_address()"><i class="el-icon-plus"></i>新建地址</el-menu-item>
						  <el-menu-item index="2-5" v-on:click="new_order()"><i class="el-icon-plus"></i>新建订单</el-menu-item>
					  </el-menu-item-group>
				  </el-submenu>

				  <el-submenu index="3">
					  <template slot="title"><i class="el-icon-menu"></i>反馈信息</template>
					  <el-menu-item-group>
						  <el-menu-item index="3-1" v-on:click='find_is_not_view()'><i class="el-icon-help"></i>未查看</el-menu-item>
						  <el-menu-item index="3-2" v-on:click="find_is_view()"><i class="el-icon-help"></i>已查看</el-menu-item>
					  </el-menu-item-group>
				  </el-submenu>

				  
	          </el-menu>
	      </el-aside>
	  <el-main>

		  <el-table :data="tableData" v-if="status==1" @row-click="rowOrderClick">

			  <el-table-column prop="order_id" label="订单号" width="140">
			  </el-table-column>
			  <el-table-column prop="sender_id" label="发货方编号" width="120">
			  </el-table-column>
			  <el-table-column prop="sender_address" label="发货地址">
			  </el-table-column>
			  <el-table-column prop="sender_time" label="发送时间">
			  </el-table-column>
			  <el-table-column prop="order_create_time" label="订单完成时间">
			  </el-table-column>
			  <el-table-column label="编辑" width="100">
				  <el-button type="warning" icon="el-icon-star-off" v-on:click="openUpdateOrder">编辑</el-button>
			  </el-table-column>
			  <el-table-column label="删除" width="100">
				  <el-button type="danger" icon="el-icon-star-off" v-on:click="deleteOrder">删除</el-button>
			  </el-table-column>
		  </el-table>

		  <el-table :data="tableData" v-else-if="status==2">
			  <div style="color: red;font-size: 20px;">收货列表</div>
			  <el-table-column prop="order_id" label="订单号" width="140">
			  </el-table-column>
			  <el-table-column prop="accept_id" label="接收方编号" width="120">
			  </el-table-column>
			  <el-table-column prop="accept_address" label="收货地址">
			  </el-table-column>
			  <el-table-column prop="order_completed_time" label="完成时间">
			  </el-table-column>
<!--			  <el-table-column label="编辑" width="100">-->
<!--				  <el-button type="warning" icon="el-icon-star-off">编辑</el-button>-->
<!--			  </el-table-column>-->
			  <el-table-column label="删除" width="100">
				  <el-button type="danger" icon="el-icon-star-off" v-on:click="deleteOrder">删除</el-button>
			  </el-table-column>
		  </el-table>

		  <el-table :data="tableData" v-else-if="status==3" row-class-name="rowname" @row-click="rowClick">
			  <el-button type="primary">添加地址</el-button>
			  <el-table-column prop="user_id" label="用户编号" width="140"></el-table-column>
			  <el-table-column prop="user_common_name" label="姓名" width="120"></el-table-column>
			  <el-table-column prop="user_common_phone" label="手机号"></el-table-column>
			  <el-table-column prop="user_common_address" label="地址"></el-table-column>
			  <el-table-column label="选择" width="100" >
				  <el-button type="success" icon="el-icon-star-off" v-on:click="rowClick">选择</el-button>
			  </el-table-column>
			  <el-table-column label="编辑" width="100" >
				  <el-button type="warning" icon="el-icon-star-off" v-on:click="handleCreate">编辑</el-button>
			  </el-table-column>
			  <el-table-column label="删除" width="100">
				  <el-button type="danger" icon="el-icon-star-off" v-on:click='delete_common' v-on:click="deleteOrder">删除</el-button>
			  </el-table-column>
		  </el-table>
		  <!--		  feedback_info: "送货上门"-->
		  <!--		  feedback_time: "2021-07-07 07:26:02"-->
		  <!--		  is_viewed: 1-->
		  <!--		  user_id: "0006"-->
		  <!--		  _Id: 2-->
		  <el-table :data="tableData" v-else-if="status==6">
			  <el-table-column prop="_Id" label="反馈id">
			  </el-table-column>
			  <el-table-column prop="user_id" label="用户id">
			  </el-table-column>
			  <el-table-column prop="feedback_info" label="反馈信息">
			  </el-table-column>
			  <el-table-column prop="feedback_time" label="提交时间">
			  </el-table-column>
		  </el-table>
		  <el-table :data="tableData" v-else-if="status==7" row-class-name="rowname" @row-click="feedbackRowClick">
			  <el-table-column prop="_Id" label="反馈id">
			  </el-table-column>
			  <el-table-column prop="user_id" label="用户id">
			  </el-table-column>
			  <el-table-column prop="feedback_info" label="反馈信息">
			  </el-table-column>
			  <el-table-column prop="feedback_time" label="提交时间">
			  </el-table-column>
			  <el-table-column label="已查看" width="100">
				  <el-button type="danger" icon="el-icon-star-off" v-on:click='view_feedback'>已查看</el-button>
			  </el-table-column>
		  </el-table>
		  <el-form v-else-if="status==4" :model="addFrom" label-width="15%">
			  <!-- 用戶名 -->
			  <el-form-item label="姓名:" >
				  <el-input  v-model="addFrom.username">
				  </el-input>
			  </el-form-item>
			  <!-- 密码 -->
<!--			  <el-form-item label="密码:" prop="newphone">-->
				  <el-form-item label="手机号:" >
				  <el-input v-model="addFrom.newphone">
				  </el-input>
			  </el-form-item>
			  <el-form-item label="地址:" >
				  <el-input v-model="addFrom.newaddredd">
				  </el-input>
			  </el-form-item>
			  <!-- 按钮 -->
			  <el-form-item >
				  <el-button type="primary" round v-on:click="send_new_address()">发送</el-button>
			  </el-form-item>
		  </el-form>

		  <el-form v-else-if="status==5" :model="addOrder" label-width="15%">
			  <!-- 用戶名 -->
			  <el-form-item label="我的手机:" >
				  <el-input  v-model="addOrder.sender_phone">
				  </el-input>
			  </el-form-item>
			  <el-form-item label="我的地址:" >
				  <el-input v-model="addOrder.sender_address">
				  </el-input>
			  </el-form-item>
			  <el-form-item label="收件人手机:" >
				  <el-input  v-model="addOrder.accept_phone">
				  </el-input>
			  </el-form-item>
			  <el-form-item label="收件地址:" >
				  <el-input v-model="addOrder.accept_address">
				  </el-input>
			  </el-form-item>

			  <el-form-item label="预约区间时间:" >
				  <el-date-picker
						  v-model="addOrder.sender_time"
						  type="datetime"
						  format="yyyy-MM-dd HH:mm:ss"
						  placeholder="选择日期时间">
				  </el-date-picker>
			  </el-form-item>

<!--			  <div class="block">-->
<!--				  <span class="demonstration">预约区间时间</span>-->
<!--				  <el-date-picker-->
<!--						  v-model="addOrder.sender_time"-->
<!--						  type="datetime"-->
<!--						  format="yyyy-MM-dd HH:mm:ss"-->
<!--						  placeholder="选择日期时间">-->
<!--				  </el-date-picker>-->
<!--			  </div>-->
			  <!-- 按钮 -->
			  <el-form-item >
				  <el-button type="primary" round v-on:click="send_new_order()">发送</el-button>
			  </el-form-item>
		  </el-form>

		  <div class="tab-container">
			  <el-dialog :visible.sync="dialogFormVisible">
				  <el-form
						  :model="questionForm"
						  ref="dataForm"
						  label-position="left"
						  label-width="90px"
						  style="width: 400px; margin-left:50px;">
					  <el-form-item label="姓名" prop="otherAnswer1">
						  <el-input v-model="questionForm.otherAnswer1" placeholder = "若修改请输入" />
					  </el-form-item>
					  <el-form-item label="手机号" prop="otherAnswer2">
						  <el-input v-model="questionForm.otherAnswer2" placeholder = "若修改请输入"/>
					  </el-form-item>
					  <el-form-item label="地址" prop="otherAnswer3">
						  <el-input v-model="questionForm.otherAnswer3" placeholder = "若修改请输入"/>
					  </el-form-item>
						  </el-select>
					  </el-form-item>
				  </el-form>
				  <div slot="footer" class="dialog-footer">
					  <el-button @click="dialogFormVisible = false">取消</el-button>
					  <el-button type="primary" @click="createData()">确定</el-button>
				  </div>
			  </el-dialog>
		  </div>
		  <div class="tab-container">
			  <el-dialog :visible.sync="dialogFormVisible">
				  <el-form
						  :model="questionForm"
						  ref="dataForm"
						  label-position="left"
						  label-width="90px"
						  style="width: 400px; margin-left:50px;">
					  <el-form-item label="姓名" prop="otherAnswer1">
						  <el-input v-model="questionForm.otherAnswer1" placeholder = "若修改请输入" />
					  </el-form-item>
					  <el-form-item label="手机号" prop="otherAnswer2">
						  <el-input v-model="questionForm.otherAnswer2" placeholder = "若修改请输入"/>
					  </el-form-item>
					  <el-form-item label="地址" prop="otherAnswer3">
						  <el-input v-model="questionForm.otherAnswer3" placeholder = "若修改请输入"/>
					  </el-form-item>
					  </el-select>
					  </el-form-item>
				  </el-form>
				  <div slot="footer" class="dialog-footer">
					  <el-button @click="dialogFormVisible = false">取消</el-button>
					  <el-button type="primary" @click="createData()">确定</el-button>
				  </div>
			  </el-dialog>

			  <el-dialog :visible.sync="updateOrder.Visible">
				  <el-form
						  :model="updateOrder"
						  ref="dataForm"
						  label-position="left"
						  label-width="90px"
						  style="width: 400px; margin-left:50px;">
					  <el-form-item label="地址" prop="sender_address">
						  <el-input v-model="updateOrder.sender_address" placeholder = "若修改请输入"/>
					  </el-form-item>
					  <el-form-item label="时间" prop="sender_time">
<!--						  <el-input v-model="questionForm.otherAnswer2" placeholder = "若修改请输入"/>-->
						  <el-date-picker
								  v-model="updateOrder.sender_time"
								  type="datetime"
								  format="yyyy-MM-dd HH:mm:ss"
								  placeholder="选择日期时间"
								  editable="true">
						  </el-date-picker>
					  </el-form-item>
					  </el-select>
					  </el-form-item>
				  </el-form>
				  <div slot="footer" class="dialog-footer">
					  <el-button @click="updateOrder.Visible = false">取消</el-button>
					  <el-button type="primary" @click="confirmUpdateOrder()">确定</el-button>
				  </div>
			  </el-dialog>
		  </div>
	  </el-main>
	  </el-container>
	  </el-main>
	  </el-container>
    </div>
  </body>
<script>
	function getParams(key) {
		var reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)");
		var r = window.location.search.substr(1).match(reg);
		if (r != null) {
			return unescape(r[2]);
		}
		return null;
	};
	var formatDateTime = function (date) {
		var y = date.getFullYear();
		var m = date.getMonth() + 1;
		m = m < 10 ? ('0' + m) : m;
		var d = date.getDate();
		d = d < 10 ? ('0' + d) : d;
		var h = date.getHours();
		h = h < 10 ? ('0' + h) : h;
		var minute = date.getMinutes();
		minute = minute < 10 ? ('0' + minute) : minute;

		return y + '-' + m + '-' + d+' '+h+':'+minute+':00';
	};
	const URL_IP = "http://localhost:8888"
	const URL_API_HEAD = URL_IP+"/orderapi"
	const URL_BACKEND_API_HEAD = URL_IP+"/backendapi"
    new Vue({
        el:"#div",
        // data:{
		// 	status:0,
        //   	tableData:[],
		// 	phone:''
        // },
		data:{
			status:0,
			tableData:[],
			phone:'',
			common_phone:'',
			user_id:'',
			address:'',
			name:'',
			feedback_id:"",
			now_order_status:0,
			str_order_status:"",
			now_order_id:"",
			is_my:0,
			addFrom:{
				username:'',
				newphone:'',
				newaddredd:'',
			},
			addOrder:{
				sender_phone : '',
				sender_address : '',
				accpet_phone : '',
				accpet_address : '',
				sender_time : '',
			},
			updateOrder:{
				Visible:false,
				order_id:'',
				sender_address :'',
				sender_phone :'',
				sender_time:'',
			},
			input: "",
			questionForm : {
				otherAnswer1: "",
				otherAnswer2: "",
				otherAnswer3: "",
			},
			dialogFormVisible: false,
		},
		methods:{
			getTable(a){
				var _this = this
				// if(a==1){
					var tablename = ['','/find_all_send_info', '/find_all_accept_info']
					// console.log(a);
					this.status = parseInt(a);
					let url = URL_API_HEAD + tablename[a]
				_this.is_my = 0
					axios.get(url).then(res=>{
						console.log(res)
						if(res.data.status_code!=1){
							console.log("获取信息出错")
						}else{
							_this.tableData = res.data.data
						}
					});
				// }else{
				// 	this.status = parseInt(a);
				// 	let url = URL_API_HEAD + '/test'
				// 	axios.get(url).then(res=>{
				// 		console.log(res)
				// 		_this.tableData = res.data.data
				// 	});
				// }
				// this.find_my_common('123456')
			},
			beforeMount(){
				getParams("phone");
				this.phone = phone;
				console.log("参数param1:"+phone);//输出aa
				console.log("phone = "+ phone)
			},
			find_my_common(){
				myphone = getParams("phone");
				this.status = 3;
				let url = URL_API_HEAD+"/find_my_user_common_info"
				axios.post(url,{
					phone : myphone
				}).then(res=>{
					console.log(res)

					this.tableData = res.data
				});
			},
			find_my_accept(){
				myphone = getParams("phone");
				this.status = 2;
				this.is_my = 1
				let url = URL_API_HEAD+"/find_my_accept_info"
				axios.post(url,{
					phone:myphone
				}).then(res=>{
					console.log(res)
					this.tableData = res.data
				});

			},
			find_my_send(){
				myphone = getParams("phone");
				this.status = 1;
				this.is_my = 1
				let url = URL_API_HEAD+"/find_my_send_info"
				axios.post(url,{
					phone:myphone
				}).then(res=>{
					console.log(res)
					this.tableData = res.data
				});
			},
			find_is_view(){
				console.log("is_view");
				this.status = 6;
				let url = URL_BACKEND_API_HEAD+"/find_viewed"
				axios.get(url).then(res=>{
					console.log(res)
					this.tableData = res.data
				});
			},

			find_is_not_view(){
				// find_unviewed
				console.log("is_not_view")
				this.status = 7;
				let url = URL_BACKEND_API_HEAD+"/find_unviewed"
				axios.get(url).then(res=>{
					console.log(res)
					this.tableData = res.data
				});
			},
			feedbackRowClick(row,event,column){
				console.log(row._Id);
				this.feedback_id = row._Id;
			},
			view_feedback(){
				var _this = this
				setTimeout( function(){
					console.log(_this.common_phone+" "+_this.user_id)
					let url = URL_BACKEND_API_HEAD+"/update_feedback_by_Id"
					axios.post(url,{
						feedbackid:_this.feedback_id
					}).then(res=>{
						console.log(res);
						//更新
						_this.find_is_not_view()
					});
				}, 100 );
			},
			select(e){console.log("select " + e)},
			activeIndex2(e){console.log("activeIndex2 " + e)},
			handleSelect(e){console.log("handleSelect " + e)},
			delete_common(){
				//需要等待点击函数事件后，才能获取到按钮
				var _this = this
				setTimeout( function(){
					console.log(_this.common_phone+" "+_this.user_id)
					let url = URL_API_HEAD+"/delete_my_user_common_info"
					axios.post(url,{
						user_id:_this.user_id,
						phone:_this.common_phone,
					}).then(res=>{
						console.log(res);
						//更新
						_this.find_my_common()
					});
				}, 100 );
				// console.log(this.tableData.phone)
			},

			updatePage(){
				var _this = this
				if(_this.status <= 2){
					if(_this.is_my == 0){
						_this.getTable(_this.status)
					}else if(_this.status == 1){
						_this.find_my_send()
					}else if(_this.status == 2){
						_this.find_my_accept()
					}
				}else if(_this.status == 3){
					_this.find_my_common()
				}else if(_this.status == 6){
					_this.find_is_view()
				}else if(_this.status == 7){
					_this.find_is_not_view()
				}
			},
			rowClick(row,event,column){
				var _this = this;
				_this.common_phone = row.user_common_phone;
				_this.user_id = row.user_id;
				_this.address = row.user_common_address;
				_this.name = row.user_common_name;
				console.log(row);
				// _this.questionForm.otherAnswer1 =  _this.name;
				// _this.questionForm.otherAnswer2 =  _this.common_phone;
				// _this.questionForm.otherAnswer3 =  _this.address;
			},
			rowOrderClick(row,event,column){
				var _this = this;
				_this.updateOrder.order_id = row.order_id;
				_this.updateOrder.sender_address = row.sender_address;
				_this.updateOrder.sender_time = row.sender_time;
				_this.updateOrder.sender_phone = row.sender_phone;
				console.log("选择订单");
				console.log(row);
				console.log(_this.updateOrder);
				_this.get_status(row.order_id)
				// _this.questionForm.otherAnswer1 =  _this.name;
				// _this.questionForm.otherAnswer2 =  _this.common_phone;
				// _this.questionForm.otherAnswer3 =  _this.address;
			},
			openUpdateOrder(){
				var _this = this;
				_this.updateOrder.Visible = true;
			},
			confirmUpdateOrder(){
				var _this = this;
				_this.updateOrder.Visible = false;
				console.log("更新订单")
				console.log(_this.updateOrder)

					let url = URL_API_HEAD+"/send_order"
					axios.post(url,{
						order_id : _this.updateOrder.order_id,
						sender_address :_this.updateOrder.sender_address,
						sender_time : formatDateTime(_this.updateOrder.sender_time),
					}).then(res=>{
						console.log("更新订单结果")
						console.log(res);
						_this.updatePage()
						//更新
						// _this.find_my_common()
					});

			},

			get_status(order_id){
				var status_dict = {
					0:"待支付",
					1:"待发件",
					2:"运输中",
					3:"待收货",
					4:"已取消",
					5:"已完成",
				}
				console.log("order_id = " + order_id)
				var _this = this
				_this.now_order_id = order_id
				axios.post(URL_API_HEAD+"/find_order_status",{
					order_id:order_id
				}).then(res=>{
					// console.log(res.data)
					_this.now_order_status = res.data
					_this.str_order_status = status_dict[res.data]
				})
			},
			deleteOrder(){
				var _this = this
				setTimeout( function(){
					console.log("deleteOrder")
					console.log(_this.now_order_id)
					console.log(_this.now_order_status)

					axios.post(URL_API_HEAD+"/cancel_order",{
						order_id:_this.now_order_id,
						order_status:_this.now_order_status
					}).then(res=>{
						console.log(res.data)
						_this.updatePage()

					})
				}, 100 );

			},
			new_address(){	//跳转新建地址页面
				this.status = 4;
			},
			new_order(){	//跳转新建订单页面
				var _this = this;
				_this.status = 5;
				_this.addOrder.sender_phone = _this.common_phone;
				_this.addOrder.sender_address = _this.address;
				console.log(_this.addOrder);
			},
			send_new_address(){
				//需要等待点击函数事件后，才能获取到按钮
				var _this = this;
				var myphone = getParams("phone");
				var id;
				console.log(_this.addFrom.username + " " + _this.addFrom.newphone+" "+_this.addFrom.newaddredd)
				setTimeout( function(){
					axios.post(URL_API_HEAD+"/get_user_id",{
						phone:myphone
					}).then(res=>{
						console.log(res)
						id = res.data;
						axios.post(URL_API_HEAD+"/insert_my_user_common_info",{
							user_id:id,
							user_common_phone:_this.addFrom.newphone,
							user_common_name:_this.addFrom.username,
							user_common_address:_this.addFrom.newaddredd,
						}).then(res=>{
							console.log(res);
							//更新
							_this.find_my_common()
						});
					});
				}, 100 );
				// console.log(this.tableData.phone)
			},
			send_new_order(){
				//需要等待点击函数事件后，才能获取到按钮
				var _this = this;
				var myphone = getParams("phone");
				// var id;
				console.log("原订单信息")
				console.log(this.addOrder);
				var newOrderMap = {}
				for (let key in this.addOrder) {
					if(this.addOrder[key]!=""){
						newOrderMap[key] = this.addOrder[key]
					}
				}
				console.log(newOrderMap)
				console.log(newOrderMap['sender_phone'])
				console.log(newOrderMap['sender_address'])
				console.log(newOrderMap['accpet_phone'])
				console.log(newOrderMap['accpet_address'])
				newOrderMap['sender_time'] = formatDateTime(newOrderMap['sender_time']),
						// setTimeout( function(){
						axios.post(URL_IP+"/orderapi/create_order",{
							newOrderMap
						}).then(res=>{
							console.log("新建订单返回值")
							console.log(res)
						});
				// }, 100 );
				// console.log(this.tableData.phone)
			},
			//添加增加
			createData(){
				const params = this.questionForm;
				// alert(JSON.stringify(params))
				var _this = this;
				_this.delete_common();
				var myphone = getParams("phone");
				var id;
				console.log(_this.questionForm)
				setTimeout( function(){
					axios.post(URL_API_HEAD+"/get_user_id",{
						phone:myphone
					}).then(res=>{
						console.log(res)
						id = res.data;
						axios.post(URL_API_HEAD+"/insert_my_user_common_info",{
							user_id:id,
							user_common_phone:_this.questionForm.otherAnswer2,
							user_common_name:_this.questionForm.otherAnswer1,
							user_common_address:_this.questionForm.otherAnswer3,
						}).then(res=>{
							console.log(res);
							//更新
							_this.find_my_common();
						});
					});
				}, 100 );
				console.log(params);
			},
			delete_order(){

			},
			handleCreate(){
				var _this = this
				setTimeout( function(){
					_this.dialogFormVisible = true;
					_this.questionForm.otherAnswer1 =  _this.name;
					_this.questionForm.otherAnswer2 =  _this.common_phone;
					_this.questionForm.otherAnswer3 =  _this.address;
					// _this.createData();
				}, 100 );
			},
			GoToMain(){
				console.log('test')
				type = getParams("user_type");
				let url;
				if(type == 1)
					url = "/deliver/main.html?phone="+getParams("phone") + "&user_type=1";
				else
					url = "/deliver/base_main.html?phone="+getParams("phone") + "&user_type=0";
				window.location.href=url
			},
			GoToMycenter(){
				console.log('test')
				type = getParams("user_type");
				let url;
				if(type == 1)
					url = "/deliver/mycenter.html?phone="+getParams("phone") + "&user_type=1";
				else
					url = "/deliver/mycenter.html?phone="+getParams("phone") + "&user_type=0";
				window.location.href=url
			},
			GoToLogin(){
				console.log('test')
				let url = "/deliver/login.html"
				window.location.href=url
			}
		}
    });
</script>
  </html>